<%@page import="com.hotel.test.service.LocalLocalServiceUtil"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@include file="/html/init.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>

<body>

<%
String url = (String)request.getAttribute("url");

String localId =  request.getParameter("localId");

if(localId != null)
{
	Local local = LocalLocalServiceUtil.getLocal(Long.parseLong(localId));
	%>
<portlet:actionURL name="updateLocal" var="editLocalURL">
<portlet:param name="redirectTo" value="<%=url %>"></portlet:param>
</portlet:actionURL>


<aui:form action="<%= editLocalURL%>">
		<aui:input type="hidden" name="localId" value="<%=local.getLocalId() %>"></aui:input>
		<aui:input type="text" name="localName" value="<%=local.getLocalName() %>"></aui:input>
		<aui:input  type = "textarea" name = "introduce" cols= "120" rows = "15"></aui:input>
		<aui:input name="image" ></aui:input>
		<aui:button type="submit" name="save"></aui:button>
	</aui:form>
	
	<%
}

else
{
	%>
	<h1>Rong roi</h1>
	<%
}

%>

</body>
</html>